var express = require('express');
const WorkController = require('../../controllers/admin/WorkController');
var WorkRouter = express.Router();
//图片上传
const multer = require("multer")
const upload = multer({dest:"public/workuploads/"})
// 朝这个路径发送请求  就会进UserController方法
WorkRouter.post("/adminapi/work/add",upload.single("file"),WorkController.add)
WorkRouter.get("/adminapi/work/list",WorkController.getList)
WorkRouter.get("/adminapi/work/list/:id",WorkController.getList)
WorkRouter.post("/adminapi/work/list",upload.single("file"),WorkController.updateList)
WorkRouter.delete("/adminapi/work/list/:id",WorkController.delList)

 
module.exports = WorkRouter;
